What are maskable and non-maskable interrupts? Explain with examples.
What are maskable and non-maskable interrupts? Explain with examples.
42627-Apr-2023
Updated on 27-Apr-2023
Home / DeveloperSection / Forums / What are maskable and non-maskable interrupts? Explain with examples.
What are maskable and non-maskable interrupts? Explain with examples.
Krishnapriya Rajeev
27-Apr-2023In computing, an interrupt is a signal sent to the processor indicating that some event or condition has occurred that requires immediate attention from the CPU. Interrupts are used to handle asynchronous events and to provide multitasking capabilities to the system.
There are two types of interrupts: maskable and non-maskable interrupts.
Examples of maskable interrupts include keyboard interrupts, timer interrupts, and I/O interrupts. These interrupts can be disabled or re-enabled by the software, depending on the system requirements.
2. Non-Maskable Interrupts: Non-maskable interrupts are interrupts that cannot be disabled or "masked" by the processor. When a non-maskable interrupt occurs, the processor must immediately stop its current operation and jump to the interrupt handler, without checking the interrupt mask.
Examples of non-maskable interrupts include hardware faults, power failures, and system resets. These interrupts are used to signal critical events that require immediate attention and cannot be ignored.
In summary, maskable interrupts can be controlled by the software, while non-maskable interrupts are always prioritized and cannot be ignored.